package design_pattern.builder;

public class House {
     Wall wall;
     Door door;
     Window window;
     @Override
    public String toString() {
        return this.wall.getWallName() + "	"+this.getDoor().getDoorName() + "	"+this.getWindow().getWindowName();
    }
    public static House createHouse(Builder builder) {
	House h = new House();
	h.setWall(builder.buildWall());
	h.setDoor(builder.buildDoor());
	h.setWindow(builder.buildWindow());
	return h;
    }
    private House(){
	
    }
    public  Wall getWall() {
        return wall;
    }
    public  void setWall(Wall wall) {
        this.wall = wall;
    }
    public  Door getDoor() {
        return door;
    }
    public  void setDoor(Door door) {
	this.door = door;
    }
    public  Window getWindow() {
        return window;
    }
    public  void setWindow(Window window) {
	this.window = window;
    }
    
}
